#!/bin/sh

OS=`uname`

set -x
aclocal
LIBTOOL="libtoolize"

if [[ ${OS} = 'Darwin' ]]; then
  LIBTOOL="glibtoolize"
fi
${LIBTOOL} --force --copy

# cat /usr/share/aclocal/libtool.m4 \
#     /usr/share/aclocal/ltoptions.m4 \
#     /usr/share/aclocal/ltversion.m4 \
#     /usr/share/aclocal/ltsugar.m4 \
#     /usr/share/aclocal/lt~obsolete.m4 \
#   >> aclocal.m4

autoheader
automake --foreign --add-missing --copy
autoconf
